
//选择职务
var selectJob = function(callback){
	//创建窗口
	var win = $("<div id='lzh-win-common-select-job'>").window({    
	    width:400,    
	    height:250,        
	    modal:true,
	    title:'选择分类',
	    href:'toClassify'
	}); 
	
	win.window({onLoad:function(){
		//为datagrid绑定双击事件
		$("#lzh_common_classify").datagrid({onDblClickRow:function(index, row){
			
			callback(row);
			
			win.window("destroy");
		}});
	}});
	
	win.window("open");
}

//选择客户
var getCustomer = function(callback){
		var win = $("<div id='zj-win-common-select-customer'>").window({    
		    width:700,    
		    height:300,    
		    modal:true,
		    title:'选择客户',
		    href:'toCustomerInfoall' 
		}); 
		
		win.window({onLoad:function(){
			$("#lwc_table").datagrid({onDblClickRow:function(index, row){
				callback(row);
				win.window("destroy"); 
			}});
		}});
		win.window("open");  
	}



var getSource = function(callback){
	var win = $("<div id='lwc-win-common-select-customer'>").window({    
	    width:550,    
	    height:300,    
	    modal:true,
	    title:'选择来源',
	    method:'get',
	    href:'tolwc_laiyuan'   
	}); 
	
	win.window({onLoad:function(){
		$("#lwc_customer_source_table").datagrid({onDblClickRow:function(index, row){
			callback(row);
			win.window("destroy");
		}});
	}});
	win.window("open");
}

